<template>
  <div>
    <button @click="toggle">Toggle</button>
    <transition name="slide">
      <div v-if="show" class="content">
        Content goes here...
      </div>
    </transition>
  </div>
</template>
<script>
export default {
  data() {
    return {
      show: false
    };
  },
  methods: {
    toggle() {
      this.show = !this.show
    }
  }
}
</script>
<style scoped>
.slide-enter-active,
.slide-leave-active {
  transition: all 0.5s ease;
}

.slide-enter,
.slide-leave-to {
  transform: translateX(100%);
}

.content {
  width: 300px;
  height: 200px;
  background-color: #f8f8f8;
  border: 1px solid #ccc;
}
</style>